<?php
namespace Common\Model;
use Think\Model\ViewModel;
class UserGroupAccessViewModel extends ViewModel {
    protected $viewFields = array(
        'UserGroupAccess'=>array('*', '_type'=>'LEFT'),
        'UserGroup'=>array('title'=>'group_name', 'code'=>'group_code', 'status'=>'group_status', 'rules'=>'group_rules', 'pid'=>'group_pid', '_type'=>'LEFT', '_on'=>'UserGroupAccess.group_id = UserGroup.id'),
        'User'=>array('username', 'nickname', 'status'=>'user_status', 'email', 'phone', 'avatar', 'reg_ip', 'reg_time', 'reg_time', '_type'=>'LEFT', '_on'=>'UserGroupAccess.uid = User.id'),
    );
}